#include"music.h"

/*开始播放*/
void start_madplay(char *str)
{
    char cmd[256] = {0};
    printf("madplay %s &\n",str);
    sprintf(cmd,"madplay %s &",str);//拼接新的音乐文件名
    printf("cmd:%s\n",cmd);
    system(cmd);
}

/*暂停播放*/
void stop_madplay(void)
{
    system("killall -SIGSTOP madplay");//停止madplay进程
}

/*继续播放*/
void continue_madpaly(void)
{
    system("killall -SIGCONT madplay");
}

/*杀死播放*/
void kill_madplay(void)
{
    system("killall -SIGKILL madpaly");//杀死madplay进程
}
